package com.gxc.validation;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @author GongXincheng
 * @since 2019-10-12 17:41
 */
@Target({ElementType.FIELD, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = {MyConstraintValidator.class})
public @interface MyConstraint {

    String message() default "constraint is error";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

}
